use std::collections::HashSet;

struct Solution {}

fn main() {}

impl Solution {
    pub fn get_sneaky_numbers(nums: Vec<i32>) -> Vec<i32> {
        let mut ret: Vec<i32> = vec![];
        let mut set: HashSet<i32> = HashSet::new();
        for x in nums {
            if set.contains(&x) {
                ret.push(x);
            } else {
                set.insert(x);
            }
        }
        ret
    }
}